<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
  <script>
  
  function showDialog(url) {
     
      
$("body").append('<div id="dialog"></div>');

//width:auto, 
$("#dialog").load(url, function() {
    $("#dialog").dialog();
});
}
  </script>